<!DOCTYPE html>
<html>
<head>
	<title>Laporan Pembayaran</title>
	<style type="text/css">
		body {
			font-family: 'arial', 'times new roman';
			font-size: 12px;
		}
		table {
			border-collapse: collapse;
			width: 100%;
			border-color: #000;
		}
		table thead tr th {
			padding: 5px 8px;
			background: #eee;
			font-size: 13px;
			border-bottom: 2px solid;
		}
		table tbody tr td {
			padding: 5px 5px;
		}
		table > tbody > tr:nth-child(odd) > td {
			background: #fafafa;
		}
		h1 {
			font-size: 18px;
		}
	</style>
</head>
<body>

<h1 align="center">LAPORAN PEMBAYARAN</h1>
<h1>Periode <?php echo $str_periode;?></h1>
<h1>Lembaga <?php echo $str_lembaga;?></h1>
<h1>Kelas <?php echo $str_kelas;?></h1>

<table border="1">
	<thead>
		<tr>
			<th width="4%">No</th>
			<th width="20%">Nama Siswa</th>
			<th width="11%">NVA</th>
			<th width="13%">NIS</th>
			<th width="8%">Kelas</th>
			<?php
				if(isset($arr_komp)){
				foreach($arr_komp as $val){
			?>
				<th><?php echo $val;?></th>
			<?php
			}
			}
			?>
			<th>Total</th>
		</tr>
	</thead>
	<tbody>
	<?php
		$total=0;
		if(isset($laporan)){
		$no=1;
		
		foreach($laporan as $key=>$val){
	?>
		<tr>
			<td><?php echo $no;?></td>
			<td><?php echo $val['nm_lengkap'];?></td>
			<td><?php echo $val['nis'];?></td>
			<td align="center"><?php echo $val['nva'];?></td>
			<td><?php echo $val['nama_kelas'];?></td>
			<?php
				foreach($arr_komp as $key_komp => $val_komp){
					echo "<td align='right'>".number_format($val[$key_komp],0,",",".")."</td>";
			?>
			
			<?php
			}
			?>
			<td align="right"><?php echo number_format($val['total_kanan'],0,",",".")?></td>
		</tr>
	<?php
		$total+=$val['total_kanan'];
		$no++;
		}
	}
	?>
	<tr>
		<td colspan="5">Total</td>
		<?php
		if(isset($arr_jumlah)){
			foreach($arr_jumlah as $val){
		?>
		<td align="right"><?php echo number_format($val,0,",",".");?></td>
		<?php
			}
		}
		?>
		<td align="right"><?php echo number_format($total,0,",",".");?></td>
	</tr>
	</tbody>
</table>


</body>
</html>